'use strict'

class Common {

}
Common.ELECTRON = 'Electron'
Common.ELECTRONJS_WECHAT = 'Electronjs WeChat'
Common.DEBUG_MODE = false
Common.WINDOW_SIZE_LOGIN = {
  width: 380,
  height: 540,
}
Common.WINDOW_SIZE_LOADING = {
  width: 380,
  height: 120,
}
Common.WINDOW_SIZE_SETTINGS = {
  width: 800,
  height: 600,
}

Common.USER_AGENT = {
  freebsd: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
  sunos: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
  win32: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
  linux: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
  darwin: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36'
}

Common.WEB_WECHAT = 'https://wx.qq.com/?lang=en_US'
Common.GITEE = 'https://gitee.com/Liaojx/electronjs-wechat'
Common.GITEE_RELEASES = 'https://gitee.com/Liaojx/electronjs-wechat/releases'
Common.GITEE_ISSUES = 'https://gitee.com/Liaojx/electronjs-wechat/issues'
Common.GITEE_HOST = 'gitee.com'
Common.GITEE_RELEASE_LATEST_PATH = '/Liaojx/electronjs-wechat/releases/latest'

Common.UPDATE_ERROR_ELECTRON = `Failed to get the local version. If you are using debug mode(by \`npm start\`), this error would happen. Use packed app instead or manually check for updates.\n\n${Common.GITEE_RELEASES}`
Common.UPDATE_ERROR_EMPTY_RESPONSE = 'Failed to fetch release info.'
Common.UPDATE_ERROR_UNKNOWN = 'Something went wrong.'
Common.UPDATE_NA_TITLE = 'No Update Available'
Common.UPDATE_ERROR_NETWORK = 'Connection hang up unexpectedly. Check your network settings.'
Common.UPDATE_ERROR_LATEST = (version) => {
  return `You are using the latest version(${version}).`
}

Common.MENTION_MENU_INITIAL_X = 300
Common.MENTION_MENU_OFFSET_X = 30
Common.MENTION_MENU_INITIAL_Y = 140
Common.MENTION_MENU_OFFSET_Y = 45
Common.MENTION_MENU_WIDTH = 120
Common.MENTION_MENU_OPTION_HEIGHT = 30
Common.MENTION_MENU_OPTION_DEFAULT_NUM = 4
Common.MENTION_MENU_HINT_TEXT = 'Mention:'

Common.MESSAGE_PREVENT_RECALL = 'Blocked a message recall.'
Common.EMOJI_MAXIUM_SIZE = 120

Common.languageTitle = 'Language（Need to Restart）'
Common.languageDesc = 'Select a default language for WeChat!'
Common.recallTitle = 'Prevent Message Recall'
Common.recallDesc = 'Message recall feature might be annoying'
Common.instanceTitle = 'Allow Multiple Instance'
Common.instanceDesc = 'Multiple instance can login with different accounts'
Common.iconTitle = 'File Path (In Development)'
Common.iconDesc = 'Set a default file path'
Common.trayTitle = 'Tray Icon color (Black/White)'
Common.trayDesc = 'Select a color to match your desktop theme'
Common.DevModeTitle = 'Developer mode'
Common.DevModeDesc = 'check source code and debug'
Common.LoggerLevelTitle = 'Log level'
Common.LoggerLevelDesc = ''
Common.WinSizeTitle = 'Window size'
Common.WinSizeDesc = ''
Common.DownloadDirTitle = 'Download dirictory'
Common.DownloadDirDesc = 'file save dirictory'

Common.UPGRADE = 'UPGRADE'
Common.FEEDBACK = 'FEEDBACK'
Common.FILE_SAVE_DIALOGTITLE = 'Save As ...'
Common.MENU = {
  about: 'About Electronjs Wechat',
  service: 'Service',
  hide: 'Hide Application',
  hideOther: 'Hide Others',
  showAll: 'Show All',
  pref: 'Preference',
  quit: 'Quit',
  edit: 'Edit',
  undo: 'Undo',
  redo: 'Redo',
  cut: 'Cut',
  copy: 'Copy',
  paste: 'Paste',
  selectAll: 'Select All',
  view: 'View',
  reload: 'Reload This Window',
  toggleFullScreen: 'Toggle Full Screen',
  searchContacts: 'Search Contacts',
  devtool: 'Toggle DevTools',
  window: 'Window',
  min: 'Minimize',
  close: 'Close',
  allFront: 'Bring All to Front',
  help: 'Help',
  repo: 'Gitee Repository',
  feedback: 'Report Issue',
  checkRelease: 'Check for New Release',
}

module.exports = Common
